#-*- coding: utf-8 -*-
#! /usr/bin/python

import ConfigParser
import sys


reload(sys)
sys.setdefaultencoding("utf-8")

#获取配置文件，检查sn,组装参数
config = ConfigParser.ConfigParser()
config.read('search.ini')


itemcount = config.getint("global", "itemcount")
items = range(itemcount)
names = range(itemcount)
searchs = range(itemcount*3)

for i in range(itemcount):
    items[i] = ((config.get("items", "item"+str(i+1))).split('id='))[1]
    #print items[i]
    names[i] = config.get("items", "name"+str(i+1))
    for j in range(3):
        searchs[j] = config.get("searchs", "sword"+str(j+(i*3)+1))
        #print j+(i*3)+1
        #print j
        print searchs[j].encode('gbk')

